package com.zhizuobiao.class2.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by chengweixin on 2018/3/23.
 */
public class FirstController implements Controller {

    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {

        // 模型视图对象
        ModelAndView mv = new ModelAndView();
        // 视图页面
        mv.setViewName("class2");
        // Model数据
        mv.addObject("message", "FirstController");

        return mv;
    }
}
